#ifndef __BUOLA_GUI_CPROPERTYFIELD_H__
#define __BUOLA_GUI_CPROPERTYFIELD_H__

#include <buola/gui/cicon.h>
#include <buola/gui/cpropertytype.h>

namespace buola { namespace gui {

class CPropertyField
{
public:
    enum EStyle
    {
        PLF_NONE=            0,
        PLF_READONLY=        0x00000001,
        PLF_HIDDEN=          0x00000002
    };

    CPropertyField(CPropertyType *pType,const std::wstring &pName,
                   const std::wstring &pTitle=std::wstring(),
                    PIcon pIcon=nullptr,EStyle pStyle=PLF_NONE)
    {
        mType=pType;
        mName=pName;
        mTitle=pTitle;
        mIcon=pIcon;
        mStyle=pStyle;
    }

    CPropertyField(const std::wstring &pType,const std::wstring &pName,
                   const std::wstring &pTitle=std::wstring(),
                    PIcon pIcon=nullptr,EStyle pStyle=PLF_NONE)
    {
        mType=CPropertyType::GetType(pType);
        mName=pName;
        mTitle=pTitle;
        mIcon=pIcon;
        mStyle=pStyle;
    }

    CPropertyField(const CPropertyField &pOther)
        :   mType(pOther.mType),
            mName(pOther.mName),
            mTitle(pOther.mTitle),
            mIcon(pOther.mIcon),
            mStyle(pOther.mStyle)
    {
    }

    CPropertyType *mType;
    std::wstring mName;
    std::wstring mTitle;
    PIcon mIcon;
    EStyle mStyle;
};

/*namespace gui*/ } /*namespace buola*/ }

#endif
